package com.lh.controller;

import com.alibaba.fastjson.JSONObject;
import com.lh.entity.table.LeadLeader;
import com.lh.service.LeadLeaderService;
import com.lh.utils.Answer;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/leadLeader")
public class LeadLeaderController {
    @Resource
    private LeadLeaderService leadLeaderService;

    @RequestMapping("/getLeadLeaderPage")
    public Answer<Object> getLeadLeaderPage(@RequestBody JSONObject reqJson) {
        return leadLeaderService.getLeadLeaderPage(reqJson);
    }

    @RequestMapping("/getLeadLeaderList")
    public Answer<Object> getLeadLeaderList() {
        return leadLeaderService.getLeadLeaderList();
    }

    @RequestMapping("/addLeadLeader")
    public Answer<Object> addLeadLeader(@RequestBody LeadLeader leadLeader) {
        return leadLeaderService.addLeadLeader(leadLeader);
    }

    @RequestMapping("/updateLeadLeader")
    public Answer<Object> updateLeadLeader(@RequestBody LeadLeader leadLeader) {
        return leadLeaderService.updateLeadLeader(leadLeader);
    }

    @RequestMapping("/deleteLeadLeaderById")
    public Answer<Object> deleteLeadLeaderById(@RequestBody JSONObject reqJson) {
        return leadLeaderService.deleteLeadLeaderById(reqJson);
    }
}
